package com.hgkj.cloud.base.dao;

import com.github.pagehelper.Page;
import com.hgkj.cloud.base.domain.TenantTableTaskInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Mapper
public interface TenantTableTaskInfoMapper {
    int deleteByPrimaryKey(String uuid);

    int insert(TenantTableTaskInfo record);

    int insertSelective(TenantTableTaskInfo record);

    TenantTableTaskInfo selectByPrimaryKey(String uuid);

    TenantTableTaskInfo selectTaskInfoByMap(Map<String, Object> map);

    int updateByPrimaryKeySelective(TenantTableTaskInfo record);

    int updateByPrimaryKey(TenantTableTaskInfo record);

    int deleteTableTaskInfo(Map<String, Object> map);

    List<TenantTableTaskInfo> listTableTaskInfoByTaskUuid(String task_uuid);

    List<TenantTableTaskInfo> findFinishedTableTask(Map<String, Object> map);

    List<TenantTableTaskInfo> listUserFinishedTaskInfos(Map<String, Object> map);

    List<Map<String, Object>> listPageTableTaskInfos(Map<String, Object> map);

    int listPageTableTaskInfosCount(Map<String, Object> map);

    List<Map<String, Object>> listAllTableTaskInfos(Map<String, Object> map);

    List<TenantTableTaskInfo> listCheckTableTaskInfos(String task_uuid);

    List<TenantTableTaskInfo> getTableTaskInfo(Map<String, Object> map);

    int countTestUsers(Map<String, Object> map);

    int countTaskFinishedUsers(String task_uuid);

    List<Map<String, Object>> selectCountWarningUsers(Map<String, Object> map);

    List<Map<String, Object>> listTableFactorUser(Map<String, Object> map);

    int listTableFactorUserCount(Map<String, Object> map);

    List<String> listTableFactorValues(Map<String, Object> map);

    int listTableFactorCount(Map<String, Object> map);

    List<Map<String, Object>> listTableAnazyleCounts(Map<String, Object> map);

    List<Map<String, Object>> listTableAnazyleCountsByMap(Map<String, Object> map);

    List<Map<String, Object>> listTableAnazyleFactorUser(Map<String, Object> map);

    int countListTableAnazyleFactorUser(Map<String, Object> map);

    List<Map<String, Object>> listTableAnazyleFactorUserByMap(Map<String, Object> map);

    int countListTableAnazyleFactorUserByMap(Map<String, Object> map);

    Page<HashMap<String, Object>> listPageTableTaskInfoss(Map<String, Object> map);

    TenantTableTaskInfo findTableTaskInfoByUuid(@Param("uuid") String uuid);

    List<Map> listAllTableTaskInfosCount(Map<String, Object> map);

    void updateTaskInfoToChongzhi(@Param("uuid") String uuid);

    //    团体报告
    List<Map> getCommitSuicidePeople(Map<String, Object> map);

    Map<String,Object> getPoliceStressGender(Map<String, Object> map);

    List<Map<String,Object>> getPoliceStressGenderUsers(Map<String,Object> map);

    Long getPoliceStressGenderUsersCount(Map<String,Object> map);

    List<Map> getPoliceStressTenant(Map<String, Object> map);

    List<Map> getPoliceStressTime(Map<String, Object> map);

    Map<String, Object> statAllJoinTableTaskRate(Map<String, Object> map);

    //个人档案  测评 begin
    //获取用户参加的测评任务数
    Long getUserTask(Map<String,Object> map);
    //获取用户参加的测评任务总量表数
    Map<String,Long> getUserTaskInfo(Map<String,Object> map);
    //个人档案  测评 end
    Map<String, Object> statAllJoinTableTaskInfoRate(Map<String, Object> map);

    Map<String, Object> statMonthTableTaskInfo(Map<String, Object> map);

    int statTableTaskInfoCount(Map<String, Object> map);

    List<Map<String, Object>> statTenFactorWarning(Map<String, Object> map);

    int getUserTaskInfoFinishedCount(Map<String, Object> map);

    List<Map<String, Object>> listExcptionTableTaskInfos();

    List<Map<String, Object>> listExcptionTableTasks();
}